package com.epfuse.cloud.admin.api.feign;

import com.epfuse.cloud.common.core.constant.SecurityConstants;
import com.epfuse.cloud.common.core.constant.ServiceNameConstants;
import com.epfuse.cloud.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

/**
 * @Author : 孙峰
 * @Description:
 * @Date : 2022/7/18  9:36
 */
@FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.UMPS_SERVICE)
public interface RemoteDeptService {
    /**
     * 查收子级id列表
     * @return 返回子级id列表
     */
    @GetMapping("/dept/child-id/{deptId}")
    R<List<Long>> listChildDeptId(@PathVariable("deptId") Long deptId,
                                  @RequestHeader(SecurityConstants.FROM) String from);
}
